The present invention is directed to the art of digital image processing and, more particularly, to a method and apparatus for implementing integrated cavity effect correction. The present invention is especially well suited for use in desk top scanners for correcting the integrated cavity effect caused by the dependence in a measured reflectance of a patch on the surrounding background and will be described with particular reference thereto. However, it is to be understood that the present invention has broader application and can be used in a wide range of digital image processing systems and other systems where there is a need for convolution filtering with a triangular, pyramidal, or other spatial responses.
The integrated cavity effect (ICE) phenomena in digital imaging scanners refers to the dependence in the measured reflectance of a patch on the surrounding background. This effect is caused by a local change in the illumination due to light reflecting from the neighboring locations on the document and back into an illuminator in the digital imaging scanner. It is well known that these context dependent reflectance variations often cause problems in the digital reproduction of documents. As an example, the image video in the background amid black characters is often much lower than the video signal value in a broad background area. This background variation causes additional dots to be printed around the characters when images are rendered using error diffusion techniques.
The ICE also adversely affects the performance of auto-window algorithms. Typically, auto-window algorithms depend on values of background information to identify window regions in the document. Therefore, non-uniform background values can easily cause the adverse merging of two or more windows separated only by a narrow white space.
U.S. Pat. No. 5,790,281 to Knox, et al. assigned to the assignee of the instant application describes a method of mathematically adjusting the measured reflectance of an image acquired by an image acquisition device for correcting the integrating cavity effect. As described there, typical image acquisition apparatus measure the amount of light reflected from the surface of the original document and send a corresponding set of electrical signals to a printing or storage module. Image acquisition usually requires illuminating the original document using a reflecting cavity which causes the measurement of the amount of light present on the surface of the document to become distorted. The method disclosed by the Knox, et al. ""281 patent corrects this phenomenon by calculating the amount of light that reaches the surface of the original document by being reflected from the illumination system and the surrounding cavity. This allows the measured reflectance to be corrected, and the true reflectance to be used for subsequent output or storage.
In general, therefore, a rigorous mathematical method for correcting the integrated cavity effect is known. The correction formula is given by:       r    ⁡          (      x      )        =                              R          m                ⁡                  (          x          )                    ⁢              (                  1          +                      fR            c                          )                    1      +              f        ⁢                  ⟨                      R            m                    ⟩                    
where r(x) is the corrected reflectance Rm(x) is the measured reflectance, Rc is the measured reflectance for a white paper, f is the fraction of light reflected off the document that is captured by the cavity and redirected onto the document, and the  less than Rm greater than  refers to a convolution with a kernel g(x).
The convolution with a kernel g(x) is given by:       ⟨          R      m        ⟩    =            ∫                        g          ⁡                      (            x            )                          ⁢                              R            m                    ⁡                      (            x            )                          ⁢                  ⅆ          x                            ∫                        g          ⁡                      (            x            )                          ⁢                  ⅆ                      (            x            )                              
As is apparent from the above, the reflectance correction clearly depends on the weighted average measure reflectance  less than Rm greater than  of the surrounding area. This poses a significant processing problem in digital imaging systems when the selected context of the average is substantial. More particularly, when the selected context is large, the processing required in software for calculating the average is extremely slow. In addition, although it is possible to implement a real time hardware solution to the computation of the weighted average, the required circuitry is extremely expensive.
Accordingly, a method and apparatus for implementing an approximate weighted average for implementing integrated cavity effect correction in scanners is desired.
In accordance with one aspect of the invention, an inexpensive circuit and method is provided for computing the spatial dependent average in a digital image by repeatedly convolving the video data with a uniform filter. The uniform average is implemented by adding and subtracting data from the lead edge and trail edge of a selected xe2x80x9crunning blockxe2x80x9d context in both the slowscan and fastscan directions, respectively.
In accordance with a more limited aspect of the invention, a method of determining a weighted average measured reflectance parameter Rm for pixels in an image for use in integrated cavity effect correction of the image is provided. The method includes the step of computing, for each pixel of interest Pi,j in the image, and approximate spatial dependent average Ai,j, Bi,j of video values in a region of W pixels by H scan lines surrounding the pixel of interest Pi,j by twice convolving video values Vi,j of the image in said region with a uniform filter and then using a result of the convolving step for each pixel of interest Pi,j as the averaged reflectance parameter  less than Rm greater than .
A primary advantage of the invention is a simple and low cost solution for generating a weighted average measured reflectance parameter  less than Rm greater than  for use in integrated cavity effect correction in scanners.
It is another advantage of the invention that a close approximation to a rigorous calculated weighted average value in a large context is provided.
These and other advantages and benefits of the present invention will become apparent to those of ordinary skill in the art upon reading and understanding the following detailed description of the preferred embodiments.